package com.example.selectdorm.repo;

import com.example.selectdorm.entity.DormitoryUnit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DormitoryUnitRepository extends JpaRepository<DormitoryUnit, Long> {

    @Override
    List<DormitoryUnit> findAll();

    List<DormitoryUnit> findAllByBuildingId(Long buildingId);
}
